import request from '@/utils/request'

// 获取管理员操作日志
export function getAdminLogs(params) {
  return request({
    url: '/admin/logs',
    method: 'get',
    params
  })
}

// 获取用户操作日志
export function getUserLogs(params) {
  return request({
    url: '/admin/logs/user_logs',
    method: 'get',
    params
  })
}

// 获取系统日志
export function getSystemLogs(params) {
  return request({
    url: '/admin/logs',
    method: 'get',
    params
  })
}

// 清理日志
export function clearLogs(type, days) {
  return request({
    url: '/admin/logs/clear',
    method: 'post',
    data: { type, days }
  })
}

// 导出日志
export function exportLogs(params) {
  return request({
    url: '/admin/logs/export',
    method: 'get',
    params,
    responseType: 'blob'
  })
} 